package ss.pku.jsa.worklist.om;

import java.util.HashSet;
import java.util.Set;

public class Value<M, K> implements Element<M, K> {

	private K node;

	public Value(K value) {
		this.node = value;
	}

	public Set<Value<M, K>> evaluate() {
		Set<Value<M, K>> set = new HashSet<Value<M, K>>();
		set.add(this);
		return set;
	}

	@Override
	public boolean equals(Object obj) {
		@SuppressWarnings("unchecked")
		Value<M, K> value = (Value<M, K>) obj;
		return this.node.equals(value.node);
	}

	@Override
	public int hashCode() {
		return this.node.hashCode();
	}
}